#ifndef FADE_OFF_H_
#define FADE_OFF_H_

#include "FadeOn.h"

namespace JDL
{
  class FadeOff : public FadeOn
  {
  public:
    FadeOff(Drawable *obj, int speed, bool repeat = false);
    virtual ~FadeOff();
    virtual void	Do(Drawable *obj)
    {
      if (_transparency < 255)
	_transparency += _speed;
      else if (_repeat == true)
	_transparency = 0;
      obj->SetAlpha(_transparency);
    }
  }
}
